#ifndef MISC_H
#define MISC_H

#include <typeinfo>



const Real EPS = 1e-7;		// ugh.


inline int Sign (Real r)
{
	if (!r)
		return 0;
	return (r>0) ? 1: -1;
}

inline bool In01 (Real r)
{
	return (r >=0.0)&&(r <= 1.0);
}



const char *DemangleClassname (char const *s);

#define CLASSNAME(class_ptr)   DemangleClassname(typeid(*(class_ptr)).name())

#endif
